﻿package {
	import com.kerry.effect.StaticReflection;
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.net.URLRequest;
	/**
	 * com.kerry.effect.StaticReflection 类的演示文件
	 * @author PhoenixKerry（http://blog.sina.com.cn/yyy98）
	 */
	public class StaticReflectionDemo extends Sprite {
		private var loader:Loader;
		
		public function StaticReflectionDemo() {
			loader = new Loader();
			addChild(loader);
			loader.x = loader.y = 10;
			loader.load(new URLRequest("../assets/lilies.jpg"));
			loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
		}
		
		private function onLoadComplete(e:Event):void {
			var reflection:StaticReflection = new StaticReflection(loader);
			addChild(reflection);
			
			reflection.x = loader.x;
			reflection.y = loader.y + loader.height + 10;
		}
		
	}
}